package com.settlement.system.model.entity.common;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.settlement.system.converter.DateTimeFormatConvert;
import com.settlement.system.converter.WxsphBillDetailFlowTypeConvert;
import com.settlement.system.converter.WxsphBillDetailFundsTypeConvert;
import com.settlement.system.converter.WxsphBillDetailStatusConvert;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * RR-微信视频号账单
 * @author xiaochuan
 * @since 2023-12-26
 */
@Data
@ExcelIgnoreUnannotated
@HeadStyle(fillBackgroundColor = 9,fillForegroundColor = 9)
@HeadRowHeight(value = 20)
@HeadFontStyle(fontHeightInPoints = 14)
public class TblWxsphBillDetail extends BaseModel implements Serializable {


    /**
     * 店铺ID
     */
    @ColumnWidth(22)
    @ExcelProperty(value = "店铺ID")
    @ApiModelProperty(value = "店铺ID")
    private String shopId;

    /**
     * 店铺编码
     */
    @ColumnWidth(16)
    @ExcelProperty(value = "店铺编码")
    @ApiModelProperty(value = "店铺编码")
    private String shopNo;

    /**
     * 流水id
     */
    @ColumnWidth(22)
    @ExcelProperty(value = "流水id")
    @ApiModelProperty(value = "流水id")
    private String flowId;

    /**
     * 记账时间
     */
    @ColumnWidth(22)
    @ApiModelProperty(value = "记账时间")
    @ExcelProperty(value = "记账时间",converter = DateTimeFormatConvert.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date bookkeepingTime;

    /**
     * 资金类型；1订单支付收入,2订单手续费,3退款,4提现,5提现失败退票,10联盟抽佣,11平台抽佣,12团长抽佣,13返佣人气卡,
     */
    @ColumnWidth(16)
    @ExcelProperty(value = "资金类型",converter = WxsphBillDetailFundsTypeConvert.class)
    @ApiModelProperty(value = "资金类型")
    private Integer fundsType;

    /**
     * 流水类型, 1 收入，2 支出
     */
    @ColumnWidth(16)
    @ExcelProperty(value = "流水类型",converter = WxsphBillDetailFlowTypeConvert.class)
    @ApiModelProperty(value = "流水类型")
    private Integer flowType;

    /**
     * 流水金额
     */
    @ColumnWidth(16)
    @ExcelProperty(value = "流水金额")
    @ApiModelProperty(value = "流水金额")
    private BigDecimal amount;

    /**
     * 余额
     */
    @ColumnWidth(16)
    @ExcelProperty(value = "余额")
    @ApiModelProperty(value = "余额")
    private BigDecimal balance;

    /**
     * 关联订单号
     */
    @ColumnWidth(22)
    @ExcelProperty(value = "关联订单号")
    @ApiModelProperty(value = "关联订单号")
    private String orderId;

    /**
     * 关联售后单号
     */
    @ColumnWidth(22)
    @ExcelProperty(value = "关联售后单号")
    @ApiModelProperty(value = "关联售后单号")
    private String aftersaleId;

    /**
     * 关联提现单号
     */
    @ColumnWidth(22)
    @ExcelProperty(value = "关联提现单号")
    @ApiModelProperty(value = "关联提现单号")
    private String withdrawId;

    /**
     * 关联运费险单号
     */
    @ColumnWidth(22)
    @ExcelProperty(value = "关联运费险单号")
    @ApiModelProperty(value = "关联运费险单号")
    private String insuranceId;

    /**
     * 备注
     */
    @ColumnWidth(22)
    @ExcelProperty(value = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 状态 0:下载中, 1:待生成统一账单, 2:已生成统一账单
     */
    @ColumnWidth(22)
    @ExcelProperty(value = "状态",converter = WxsphBillDetailStatusConvert.class)
    @ApiModelProperty(value = "状态")
    private Integer status;

    /**
     * 关联支付单号
     */
    @ColumnWidth(30)
    @ExcelProperty(value = "关联支付单号")
    @ApiModelProperty(value = "关联支付单号")
    private String transactionId;
}
